public class Food {
    //有参构造方法
    public Food(String name,double price,int inventory){
        this.name=name;
        this.price=price;
        this.inventory=inventory;
    }

    private String name;//储存食品名
    private double price;//食品价格
    private int inventory;//食品库存

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getInventory() {
        return inventory;
    }

    public void setInventory(int inventory) {
        this.inventory = inventory;
    }
}
